//
//  DXTempViewController.swift
//  新浪微博
//
//  Created by dix on 2017/1/16.
//  Copyright © 2017年 dix. All rights reserved.
//

import UIKit

class DXTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setUpUI()
    }
      // MARK: - 设置视图
   private func setUpUI(){
        view.backgroundColor = DXRandomColor()
        setUpNAV()
    }
   private func setUpNAV(){
        //设置title
        title = "第\(navigationController?.childViewControllers.count ?? 0)个控制器"
        //设置右边按钮
    navigationItem.rightBarButtonItem = UIBarButtonItem(imgName: nil, title: "PUSH", targrt: self, action: #selector(rightClick))
    
    }
    @objc private func rightClick(){
        let tempVC = DXTempViewController()
        navigationController?.pushViewController(tempVC, animated: true)
    }

    
}
